import request from "../../util/serve"
//查看所有用户
export let findAllUser=(data)=>{
    return request({
        url:"user/findAllUser",
        method: "GET",
        params: data
    })
}
// 查看所有
export let findAll=()=>{
    return request({
        url:"user/findAll",
        method: "GET",
      
    })
}
//查看所有角色

export let findAllRoles=()=>{
    return request({
        url:"user/findAllRoles",
        method: "GET",
      
    })
}
//新增用户

export let insert=(data)=>{
    return request({
        url:"user/insert",
        method: "POST",
        data:data
    })
}
//修改用户

export let update=(data)=>{
    return request({
        url:"user/update",
        method: "POST",
        data:data
    })
}
//修改角色

export let updateRoles=(data)=>{
    return request({
        url:"user/updateRoles",
        method: "GET",
        params:data
    })
}
//删除用户

export let deleteUser=(data)=>{
    return request({
        url:"user/deleteUser",
        method: "DELETE",
        params:data
      
    })
}
//查询用户
export let Search = (data) => {
    return request({
        url:"user/Search",
        method: "GET",
        params:data
      
    })
}
//通过角色查询所有用户
export let SearchByRoleName = (data) => {
    return request({
        url:"user/SearchByRoleName",
        method: "GET",
        params:data
      
    })
}